<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    

    <title>管理员列表</title>
    <link rel="shortcut icon" href="favicon.ico">
    <link href="/static/manager/css/bootstrap.min.css?v=3.3.5" rel="stylesheet">
    <link href="/static/manager/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">

    <!-- Data Tables -->
    <link href="/static/manager/css/plugins/dataTables/dataTables.bootstrap.css" rel="stylesheet">

    <link href="/static/manager/css/animate.min.css" rel="stylesheet">
    <link href="/static/manager/css/style.min.css?v=4.0.0" rel="stylesheet"><base target="_blank">

</head>

<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>管理员列表</h5>  
                    </div>
                    <div class="ibox-content">

                        <table class="table table-striped table-bordered table-hover">
                            <thead>
                                <tr>
                                    <th>编号</th>							
                                    <th>用户名</th>
                                    <th>昵称</th>
									<th>创建时间</th>
                                    <th>操作</th>
                                </tr>
                            </thead>
                            <tbody>
                            {volist name='adlist' id='vo'}
                                <tr class="gradeX">
                                    <td>ADM0{$vo.m_id}</td>
                                    <td>{$vo.m_name}</td>
									<th>{$vo.m_nick}</th>
									<th>{$vo.crtime}</th>
                                    <td class="center">
									<button type="button" class="btn btn-primary btn-sm" onclick="updata({$vo.m_id})">编辑</button>
									<button type="button" onclick="deletedata({$vo.m_id})" class="btn btn-default btn-sm">删除</button>
									</td>
                                </tr>
                            {/volist}
                            </tbody>
                        </table>

                    </div>
                </div>
            </div>
        </div>
        
    </div>
    <script src="/static/manager/js/jquery.min.js?v=2.1.4"></script>
    <script src="/static/manager/js/bootstrap.min.js?v=3.3.5"></script>
    <script src="/static/manager/js/plugins/jeditable/jquery.jeditable.js"></script>
    <script src="/static/manager/js/plugins/dataTables/jquery.dataTables.js"></script>
    <script src="/static/manager/js/plugins/dataTables/dataTables.bootstrap.js"></script>
    <script src="/static/manager/js/content.min.js?v=1.0.0"></script>
    <script>
        $(document).ready(function(){
		$(".dataTables-example").dataTable();
		var oTable=$("#editable").dataTable();
		oTable.$("td").editable("../example_ajax.php",{"callback":function(sValue,y){var aPos=oTable.fnGetPosition(this);oTable.fnUpdate(sValue,aPos[0],aPos[1])},"submitdata":function(value,settings){return{"row_id":this.parentNode.getAttribute("id"),"column":oTable.fnGetPosition(this)[2]}},"width":"90%","height":"100%"})});function fnClickAddRow(){$("#editable").dataTable().fnAddData(["Custom row","New row","New row","New row","New row"])};

		function deletedata(id) {
            $.post("/manager/manager/admin_dele",{id:id},function(result){
                alert(result);
                window.location.reload();
            });
        }
        function updata(id) {
            window.location.href = "/manager/manager/admin_edit?id="+id;
        }
    </script>


</body>

</html>